
/*
 * @Title: 美食详情
 * @Created by: ycq
 */
<template>
	<view :class="showColl||showFx||showChooseType||showDetail?'hotel':''" >
		<!-- 头部 -->
		<view class="hotel-body" >
			<comHeader :config="navConfig"/>
			<view class="header">
				<image class="header-bg" src="../../../static/banner.png" mode=""></image>
				<view class="play"></view>
				<view class="p-num"  @click="play">
					<image src="/static/tupian.png" mode="aspectFit"></image>
					<text>10</text>
				</view>
				<view class="p-num" style="top: 208upx;">
					<image class="VR-img" src="/static/360VR.png" mode="aspectFit"></image>
				</view>
				
				<view class="header-bottom"></view>
			</view>
			
			<view class="hotel-info">
				<text class="name">新韩小馆烤肉</text>
				<!-- <view class="stars">
					<image src="../../../static/dengji.png" v-for="index in 5" :key='index' mode=""></image>
				</view> -->
				<view class="hotel-info-btn">
					<image v-if="!isFenxiang" src="../../../static/fenxiang.png" @click="togglePopup('bottom','share')" mode=""></image>
					<image v-if="isFenxiang" src="../../../static/fenxiang-1.png" @click="togglePopup('bottom','share')" mode=""></image>
					<image v-if="!isShoucang" src="../../../static/shoucang.png" @click="coll()" mode="" ></image>
					<image v-if="isShoucang" src="../../../static/shoucang-1.png" @click="coll()" mode=""></image>
					<image v-if="!isAdd" src="../../../static/add.png" mode="" @click="addXcType"></image>
					<image v-if="isAdd" src="../../../static/add-1.png" mode="" @click="addXcType"></image>
					<image class="xingcheng" src="../../../static/xingcheng.png" mode="" @click="addXcType"></image>
				</view>
				<view style="width: 100%;height: 200upx;">
					<view class="address">
						<view class="address-info">
							<image src="../../../static/pos-blue.png" mode=""></image>
							<text class="city">大连庄河市仙人洞镇北部</text>
							<text class="way">乘坐198支线到仙人洞镇，步行650米</text>
							<text class="pl-num">1562条热门评论</text>
						</view>
					</view>
					<view class="begin">开始导航</view>
				</view>
				
				<!-- 营业时间 -->
				<view class="list-title">
					<text class='shu'></text>
					<text>营业时间</text>
				</view>
				<view class="reserve">
					<view class="business">
						<text style="color: #34C260; font-size: 26upx;">营业中</text>
						<text style="color: #666666; font-size: 26upx; margin-left: 45upx;">  周一到周日  09:30- 24:00</text>
					</view>
					<view class="ydphone">
						<image src="../../../static/ydphone.png" mode=""></image>
					</view>
				</view>
				<view class="linetype" v-if="0">
					<view class="linequhao" v-if="1" @tap="goLine">
						<image src="../../../static/linequhao.png" mode=""></image>
						<text style="color: #000000; margin-left: 16upx; font-size: 26upx;">排队取号</text>
					</view>
					<view class="linequhao" @tap="goOrder">
						<image src="../../../static/chair.png" mode=""></image>
						<text style="color: #000000; margin-left: 16upx; font-size: 26upx;">预定座位</text>
					</view>
					<view style="margin-top: 30upx;">
						<image style="width: 20upx; height: 20upx; margin-right: 35upx;" src="../../../static/jiantou.png" mode=""></image>
					</view>
				</view>
				<view class="between">
					<view class="yuding" style="margin-left: 100upx;" @tap="goOrder">
						<image src="../../../static/chair.png" mode=""></image>
						<text style="color: #000000; margin-left: 16upx; font-size: 26upx;">预定座位</text>
					</view>
					<view class="line"></view>
					<view class="paiduiquhao" style="margin-right: 100upx;" @tap="goLine">
						<image src="../../../static/linequhao.png" mode=""></image>
						<text style="color: #000000; margin-left: 16upx; font-size: 26upx;">排队取号</text>
					</view>
				</view>
				
				
				<view class="list-title">
					<text class='shu'></text>
					<text>饭店简介</text>
				</view>
				<view @click="openJJ=!openJJ" :class="openJJ?'des-open':'des'">
					<text >	龙芯昂大酒店是一家商务、会议型豪华酒店，是江阴市首家五星级酒店。酒店座落在苏南工业重镇新桥镇海澜工业园内，北枕长江，南靠太湖，毗邻张家港市中心，宁太（沿江）高速横亘其侧，交通极其便利。</text>
					<view class="detail-tip">
						<image class="down" src="/static/d-down.png" :style="{transform:(openJJ?'rotate(180deg)':'')}" mode=""></image>
						<view class="more-detail">{{openJJ?'收起详情':'更多详情'}}</view>
					</view>
				</view>
			</view>
			<view class="room-list">
				<view class="list-title" style="margin-left: 0;">
					<text class='shu'></text>
					<text>用餐预定</text>
				</view>
				<view  class="room-item" v-for="(item,index) in roomData" @click="showRoomDetail"  :key='index'>
					<image :src="item.img" ></image>
					<view class="item-right">
						<view class="item-title"  @click="showRoomDetail">
							<text class="title-text">{{item.name}}</text>
							<image src="/static/jiantou.png" mode=""></image>
							<!-- #ifdef APP-PLUS|| MP-WEIXIN -->
							<text class="paymust">详情 | 购买须知</text>
							<!-- #endif -->
							<!-- #ifndef APP-PLUS|| MP-WEIXIN -->
							<text class="paymust" >详情 | 购买须知</text>
							<!-- #endif -->
						</view>
						<text class="tip">{{item.des}}</text>
					
						<text class="price">￥{{item.prize}}</text>
						<view class="buy" @click.stop="toOrder">立即预定</view>
					</view>
				</view>
			</view>
			<!-- 评论 -->
			<Comment :itemHandle='toEvaluationDetail'  :isShowPlBox="false" :isShowAllHead="true"  :itemHandle2='toEvaluation1'  /> 
			<view class="down-more">
				<image src="/static/d-down.png" mode=""></image>
				<text>下拉查看更多</text>
			</view>
			<view style="height: 19vw;"></view>
		</view>
		<FootMenu />
		<!-- 分享弹窗 -->
		<uni-popup ref="share" :type="type" :custom="true">
			<view class="uni-share">
				<view class="uni-share-title">分享到</view>
				<view class="uni-share-content">
					<view v-for="(item, index) in bottomData" :key="index" class="uni-share-content-box">
						<view class="uni-share-content-image">
							<image :src="item.icon" class="image" />
						</view>
						<view class="uni-share-content-text">{{ item.text }}</view>
					</view>
				</view>
				<view class="uni-share-btn" @click="cancel('share')">取消分享</view>
			</view>
		</uni-popup>
		<Collection v-if='showColl' />
		<FoodDetail v-if='showDetail'></FoodDetail>
		<xing-cheng v-if='this.$store.state.showXcType ||showXc'/>
		<popuper v-if='showPop'></popuper>
		<xingcheng-type v-if='showChooseType' :config='typeConfig'></xingcheng-type>
	</view>
</template>

<script>
	import Comment from '@/components/Comment.vue'
	import popuper from '@/components/Popuper.vue'
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import FoodDetail from '@/components/FoodDetail.vue'
	import XingCheng from '@/components/Xingcheng.vue'
	export default{
		data(){
			return{
				typeConfig:{
					typeId:3
				},
				showDetail:false,
				isFenxiang:true,
				isShoucang:false,
				showChooseType:false,
				showColl:false,
				showFx:false,
				isAdd:false,
				openJJ:false,
				navConfig:{
					isFixed:false,
					comScroll:200,
					left:{
						text:'',
						isShowLeft:true,
						leftGobackColor:'#ffffff',
						leftTextColor:'',
					},
					mid:{
						isShowMid:false,
						text:''
					},
					right:{
						text:'',
						isShowRight:false,
					}
				},
				roomData:[
					{
						name:'招牌二人餐',
						prize:298,
						des:'大虾，小肥羊肉，精品牛肉，蜜汁酱牛肉，蔬菜拼盘，酸梅汤，藕片，水晶粉，精品牛肉，蜜汁酱牛肉',
						img:'/static/banner.png',
						
					},
					{
						name:'招牌四人餐',
						prize:268,
						des:'大虾，小肥羊肉，精品牛肉，蜜汁酱牛肉，蔬菜拼盘，酸梅汤，藕片，水晶粉，精品牛肉，蜜汁酱牛肉',
						img:'/static/banner.png',
						
					},
				],
				bottomData: [
					{
						text: '微信',
						icon: '/static/audio/fx-wx.png',
						name: 'wx'
					},
					{
						text: '朋友圈',
						icon: '/static/audio/fx-friend.png',
						name: 'pyq'
					},
					{
						text: 'QQ',
						icon: '/static/audio/fx-qq.png',
						name: 'qq'
					},
					{
						text: 'QQ空间',
						icon: '/static/audio/fx-qqzone.png',
						name: 'qqkj'
					}
					
				],
				type: '',//uniPopup组件类型
			}
		},
		methods:{
			// 排队取号
			goLine(){
				uni.navigateTo({
					url:'/pages/home/food/line'
				})
			},
			//预订
			goOrder(){
				uni.navigateTo({
					url:'/pages/home/food/yuding1'
				})
			},
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			play(){
				uni.navigateTo({
					url:'/pages/home/hotel/photo'
				})
			},
			addXcType(){
				this.showChooseType=true
				document.body.style.overflow = 'hidden'
			},
			closeXcType(){
				this.showChooseType=false
				document.body.style.overflow = 'scroll'
			},
			coll(){
				this.showColl=true
				document.body.style.overflow = 'hidden'
			},
			closeColl(){
				this.showColl=false
				document.body.style.overflow = 'scroll'
			},
			toOrder(){
				uni.navigateTo({
					url:'foodOrder'
				})
			},
			showRoomDetail (){
				this.showDetail = true
				document.body.style.overflow = 'hidden'
			},
			closeFoodDetail(){
				this.showDetail = false
				document.body.style.overflow = 'scroll'
			},
			// toOrderC(){
			// 	uni.navigateTo({
			// 		url:'orderC'
			// 	})
			// },
			togglePopup(type,open){
				this.type = type;
				this.$refs[open].open()
				this.showFx = true
				document.body.style.overflow = 'hidden'
			},
			cancel(type) {
				this.$refs[type].close()
				this.showFx = false
			},
			toEvaluation1(){
				uni.navigateTo({
					url:'/pages/common/evaluation'
				})
			},
			toEvaluationDetail(){
				uni.navigateTo({
					url:'/pages/common/evaluationDetail'
				})
			},
		},
		computed: {
			showPop() {
				return this.$store.state.showAddCuss.show
			}
		},
		created() {
			document.body.style.overflow = 'scroll'
		},
		components:{
			Comment,
			uniPopup,
			popuper,
			XingCheng,
			FoodDetail
		}
	}
</script>

<style scoped>
	.hotel{
		width: 100%;
		height: 100vh;
		overflow: scroll;
		position: relative;
	}
	.hotel-body{
		width: 100%;
		height: 100vh;
		position: absolute;
	}
	.header{
		width: 750upx;
		height: 441upx;
		position: relative;
	}
	.header-bg{
		width: 750upx;
		height: 441upx;
		position: absolute;
	}
	.paymust{
		font-size: 25upx;
		color: #5595FF;
		/* margin-right: 50upx; */
		margin-top: 6upx;
		float: right;
	}
	.back{
		width: 30upx;
		height: 36upx;
		top: 60upx;
		left: 26upx;
		position: absolute;
	}
	.play{
		position: absolute;
		top:178upx;
		left:342upx;
		width:0;
		height:0;
		border-top:35.5upx solid transparent;
		border-bottom:35.5upx solid transparent;
		border-left:63upx solid #FFFFFF;
	}
	.p-num{
		width: 125upx;
		height: 58upx;
		top: 103upx;
		right: 0;
		position: absolute;
		background: rgba(0,0,0,0.5);
		border-radius: 30upx 0 0 30upx;
		position: absolute;
	}
	.p-num image{
		width: 26upx;
		height: 26upx;
		margin-left:36upx;
		margin-top: 17upx;
		float: left;
	}
	.VR-img{
		width: 92upx !important;
		height: 32upx !important;
		margin-left:20upx !important;
		margin-top: 13upx !important;
	}
	.p-num text{
		color: #FFFFFF;
		font-size: 24upx;
		line-height: 58upx;
		float: left;
		margin-left: 16upx;
	}
	.header-bottom{
		width: 750upx;
		height: 30upx;
		bottom: 0upx;
		border-radius: 30upx 30upx 0 0;
		background: #FFFFFF;
		position: absolute;
	}
	.hotel-info{
		width: 750upx;
		height: auto;
		background: #FFFFFF;
	}
	.name{
		font-size: 36upx;
		margin-left: 37upx;
		height: 30upx;
		float: left;
		font-weight: bold;
		margin-right: 0;
	}
	.stars{
		float: left;
		width: 150upx;
		height: 30upx;
		margin-top: 24upx;
		margin-left: 20upx;
	}
	.stars image{
		width: 22upx;
		float: left;
		margin-left: 10upx;
		height: 20upx;
	}
	.hotel-info-btn{
		width: 300upx;
		height: 37upx;
		padding-top: 80upx;
		margin-left: 37upx;
		
	}
	.hotel-info-btn image{
		width: 35upx;
		height: 35upx;
		margin-right: 30upx;
		float: left;
	}
	.xingcheng{
		width: 54upx !important;
		height: 28upx !important;
		margin-top: -10upx;
		margin-left: -15upx;
	}
	.address{
		margin-top: 30upx;
		margin-left: 37upx;
		width: 450upx;
		height: auto;
		display: table;
		float: left;
	}
	.address-info{
		width: 450upx;
		height: auto;
		float: left;
	}
	.address-info image{
		float: left;
		width: 26upx;
		margin-top: 10upx;
		height: 30upx;
	}
	.city{
		float: left;
		font-size: 34upx;
		height: 30upx;
		font-weight: bold;
		margin-left: 20upx;
	}
	.way{
		width: 450upx;
		display: block;
		margin-top: 60upx;
		font-size: 24upx;
		color: #888888;
		margin-left: 45upx;
	}
	.pl-num{
		font-size: 24upx;
		color: #888888;
		margin-left: 85upx;
	}
	.begin{
		width: 202upx;
		height: 60upx;
		background: -webkit-linear-gradient(left, #54B1FF,#5873FF);
		/* Safari 5.1 - 6.0 */
		background: -o-linear-gradient(right, #54B1FF,#5873FF);
		/* Opera 11.1 - 12.0 */
		background: -moz-linear-gradient(right, #54B1FF,#5873FF);
		/* Firefox 3.6 - 15 */
		background: linear-gradient(to right, #54B1FF,#5873FF);
		/* 标准的语法 */
		float: right;
		border-radius: 30upx;
		font-size: 30upx;
		border: none;
		margin-top: 40upx;
		line-height: 60upx;
		margin-right: 24upx;
		text-align: center;
		color: #FFFFFF;
	}
	
	.list-title{
		width: 93.4%;
		margin-left: auto;
		margin-right: auto;
		height: 58.4upx;
		margin-top:20upx;
	}
	.list-title text{
		font-size: 32upx;
		font-weight: bolder;
	}
	.shu{
		width: 0.7%;
		height: 3.06vw;
		background: #55A0FF;
		float: left;
		margin-top: 2.3vw;
		margin-right: 10px;
	}
	.des text{
		width: 700upx;
		padding-left: 25upx;
		padding-right: 25upx;
		margin-top: 30upx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-align:justify;
		text-indent:56upx;
		height: auto;
		font-size: 28upx;
		color: #888888;
	}
	.des-open text{
		width: 700upx;
		padding-left: 25upx;
		padding-right: 25upx;
		margin-top: 30upx;
		display: block;
		text-align:justify;
		text-indent:56upx;
		height: auto;
		font-size: 28upx;
		color: #888888;
	}
	.hd{
		width: 700upx;
		padding-left: 25upx;
		padding-right: 25upx;
		height: 42upx;
		margin-top: 30upx;
	}
	.hd image{
		width: 38upx;
		height: 42upx;
		float: left;
	}
	.hd text{
		margin-left: 20upx;
		font-size: 24upx;
		height: 42upx;
		display: block;
		float: left;
		line-height: 42upx;
		font-weight: bold;
	}
	.detail-tip{
		margin-top: 20upx;
		display: flex;
		flex-direction:row;
		align-items:center;
		justify-content:center; /*对齐方式*/
		
	}
	.detail-tip .down{
		width: 22upx;
		height: 22upx;
		min-width: 14px;
		min-height: 14px;
	}
	.detail-tip .more-detail{
		font-size: 28upx;
		color: #D9D9D9;
	}
	/* 房间预定 */
	.room-list{
		width: 710upx;
		margin-left: auto;
		margin-right: auto;
		margin-top: 80upx;
	}
	.room-item{
		width: 710upx;
		height: 182upx;
		margin-top: 25upx;
	}
	.room-item image{
		margin: 10upx  10upx 0upx 10upx;
		width: 239upx;
		height: 172upx;
		float: left;
		border-radius: 10upx;
	}
	.item-right{
		width: 430upx;
		height: 182upx;
		float: right;
	}
	.item-title{
		width: 100%;
		margin-top: 5upx;
		height: 50upx;
	}
	.title-text{
		font-size: 32upx;
		float: left;
	}
	
	.item-title image{
		width: 20upx;
		height: 23upx;
		float: right;
		font-size: 21upx;
		color: #666666;
	}
	.far{
		width: 100%;
		display: block;
		font-size: 25upx;
		color: #666666;
	}
	.tip{
		width: 100%;
		display: block;
		margin-top: 5upx;
		height: 60upx;
		overflow: hidden;
		font-size: 25upx;
		color: #666666;
	}
	.hd-list{
		width: 100%;
		height: 25upx;
		display: flex;
		flex-direction: row;
		margin-top: 10upx;
	}
	.hd-item{
		width: 119upx;
		height: 30upx;
		border: #FE5706 solid 1upx;
		border-radius: 20upx;
		margin-right: 15upx;
		color: #FE5706;
		text-align: center;
		line-height: 30upx;
		font-size: 20upx;
	}
	.price{
		font-size: 32upx;
		color: #DD540A;
		margin-top: 15upx;
		float: left;
		/* margin-left: 20upx; */
	}
	.buy{
		width: 127upx;
		height: 40upx;
		margin-top: 15upx;
		color: #FFFFFF;
		font-size: 22upx;
		text-align: center;
		padding-left: 0;
		padding-right: 0;
		line-height: 40upx;
		border-radius: 20upx;
		border: none;
		white-space: nowrap;  /*强制span不换行*/
		float: right;
		background: -webkit-linear-gradient(left, #54B0FF,#5773FE);
		/* Safari 5.1 - 6.0 */
		background: -o-linear-gradient(right, #54B0FF,#5773FE);
		/* Opera 11.1 - 12.0 */
		background: -moz-linear-gradient(right, #54B0FF,#5773FE);
		/* Firefox 3.6 - 15 */
		background: linear-gradient(to right, #54B0FF,#5773FE);
		/* 标准的语法 */
	}
	.quxiao{
		font-size: 28upx;
		color: #000000;
		margin-top: 20upx;
		float: left;
	}
	/* 热门评论 */
	.down-more{
		width: 750upx;
		height: 30upx;
		text-align: center;
		display: flex;
		flex-direction: row;
		justify-content:center;
		margin-top: 50upx;
	}
	.down-more image{
		width: 24px;
		height: 20px;
		margin-right: 30upx;
		
		/* padding-top: 30upx; */
		
	}
	.down-more text{
		
		font-size: 34upx;
		line-height: 35upx;
		color: #D3D2D2;
	}
	/* 底部分享 */
	.uni-share {
		background: #fff;
	}
	
	.uni-share-title {
		line-height: 60upx;
		font-size: 24upx;
		padding: 15upx 0;
		text-align: center;
	}
	
	.uni-share-content {
		display: flex;
		flex-wrap: wrap;
		padding: 15px;
	}
	
	.uni-share-content-box {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 25%;
		box-sizing: border-box;
	}
	
	.uni-share-content-image {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 60upx;
		height: 60upx;
		overflow: hidden;
		border-radius: 10upx;
	}
	
	.uni-share-content-image .image {
		width: 100%;
		height: 100%;
	}
	
	.uni-share-content-text {
		font-size: 26upx;
		color: #333;
		padding-top: 5px;
		padding-bottom: 10px;
	}
	
	.uni-share-btn {
		height: 90upx;
		line-height: 90upx;
		border-top: 1px #f5f5f5 solid;
		text-align: center;
		font-size: 30upx;
		color: #666;
	}
	/*营业时间*/
	.business{
		display: flex;
		flex-direction: row;
		justify-content:flex-start;
		margin-left: 50upx;
		margin-top: 16upx;
	}
	.reserve{
		display: flex;
		flex-direction: row;
		justify-content:space-between;
	}
	.ydphone image{
		width: 43upx;
		height: 45upx;
		margin-right: 85upx;
		margin-bottom: 17upx;
	}
	.linetype{
		display: flex;
		flex-direction: row;
		justify-content:space-between;
	}
	.linequhao{
		display: flex;
		flex-direction: row;
		justify-content:flex-start;
		margin-left: 29upx;
		margin-top: 46upx;
		margin-bottom: 46upx;
	}
	.linequhao image{
		width: 36upx;
		height: 36upx;
	}
	.between{
		display: flex;
		flex-direction: row;
		justify-content:space-between;
		margin-top: 46upx;
	}
	.yuding{
		display: flex;
		flex-direction: row;
		justify-content:flex-start;
	}
	.yuding image{
		width: 36upx;
		height: 36upx;
	}
	.line{
		width: 1upx;
		height: 51upx;
		opacity: 1;
		background: rgba(220,220,220,1);
	}
	.paiduiquhao{
		display: flex;
		flex-direction: row;
		justify-content:flex-start;
	}
	.paiduiquhao image{
		width: 36upx;
		height: 36upx;
	}
	
</style>
